#ifndef SHA256_H
#define SHA256_H

/*************************** HEADER FILES ***************************/
#include <stddef.h>
#include "stm32f1xx.h"

typedef struct {
    uint8_t		hash[32];	// Changed by RKW, unsigned char becomes uint8_t
    uint32_t	buffer[16];	// Changed by RKW, unsigned long becomes uint32_t
    uint32_t	state[8];	// Changed by RKW, unsinged long becomes uint32_t
    uint8_t		length[8];	// Changed by RKW, unsigned char becomes uint8_t
} sha256;

extern void sha256_get(uint8_t hash[32],
                const uint8_t *message,
                int length);

extern void hmac_sha256_get(uint8_t digest[32],
                     uint8_t *message, int message_length,
                     uint8_t *key, int key_length);
#endif   // SHA256_H
